package com.ruoyi.project.WebMoudle.wxHelp.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.WebMoudle.wxHelp.mapper.WxHelpMapper;
import com.ruoyi.project.WebMoudle.wxHelp.domain.WxHelp;
import com.ruoyi.project.WebMoudle.wxHelp.service.IWxHelpService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 帮助与反馈Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-07-31
 */
@Service
public class WxHelpServiceImpl implements IWxHelpService 
{
    @Autowired
    private WxHelpMapper wxHelpMapper;

    /**
     * 查询帮助与反馈
     * 
     * @param id 帮助与反馈ID
     * @return 帮助与反馈
     */
    @Override
    public WxHelp selectWxHelpById(Long id)
    {
        return wxHelpMapper.selectWxHelpById(id);
    }

    /**
     * 查询帮助与反馈列表
     * 
     * @param wxHelp 帮助与反馈
     * @return 帮助与反馈
     */
    @Override
    public List<WxHelp> selectWxHelpList(WxHelp wxHelp)
    {
        return wxHelpMapper.selectWxHelpList(wxHelp);
    }

    /**
     * 新增帮助与反馈
     * 
     * @param wxHelp 帮助与反馈
     * @return 结果
     */
    @Override
    public int insertWxHelp(WxHelp wxHelp)
    {
        wxHelp.setCreateTime(DateUtils.getNowDate());
        return wxHelpMapper.insertWxHelp(wxHelp);
    }

    /**
     * 修改帮助与反馈
     * 
     * @param wxHelp 帮助与反馈
     * @return 结果
     */
    @Override
    public int updateWxHelp(WxHelp wxHelp)
    {
        wxHelp.setUpdateTime(DateUtils.getNowDate());
        return wxHelpMapper.updateWxHelp(wxHelp);
    }

    /**
     * 删除帮助与反馈对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWxHelpByIds(String ids)
    {
        return wxHelpMapper.deleteWxHelpByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除帮助与反馈信息
     * 
     * @param id 帮助与反馈ID
     * @return 结果
     */
    @Override
    public int deleteWxHelpById(Long id)
    {
        return wxHelpMapper.deleteWxHelpById(id);
    }



    @Override
    public List<WxHelp> unDoneHelpList(WxHelp wxHelp) {
        return wxHelpMapper.unDoneHelpList(wxHelp);
    }

    @Override
    public List<WxHelp> doneHelpList(WxHelp wxHelp) {
        return wxHelpMapper.doneHelpList(wxHelp);
    }

    @Override
    public List<WxHelp> selectSysList(WxHelp wxHelp) {
        return wxHelpMapper.selectSysList(wxHelp);
    }

    @Override
    public int queryHelpMessage() {
        return wxHelpMapper.queryHelpMessage();
    }
}
